import { defineComponent } from 'vue'
import icon from './icon'
import widgetIcon from './widget-icon'

const components = {}
const createIcons = data => {
    Object.keys(data).forEach(key => {
        components[key] = defineComponent({
            name: key,
            render: () => data[key]
        })
    })
}

// 注册图标
createIcons(icon)
createIcons(widgetIcon)

export default components